<div class="container-fluid" >
<div class="row mt20">
<div class="col-md-12">
<div class="panel panel-default">
    <div class="panel-heading font-bold">
      创建产品
    </div>
    <div class="panel-body">
      <div class="form-horizontal" method="get">
        <div class="form-group">
          <label class="col-sm-3 control-label">产品名称</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" ng-model="p.name">
            <!-- <span class="help-block m-b-none">A block of help text that breaks onto a new line and may extend beyond one line.</span> -->
          </div>
        </div>
        <div class="line line-dashed b-b line-lg pull-in"></div>

        <div class="form-group" >
            <label class="col-sm-3 col-xs-4 control-label text-right">产品类型</label>
            <div class="col-sm-4 col-xs-12">
                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="product_attr"
                  ng-model="p.product_attr"
                  >
                  <i></i>
                  电子票
                </label>

                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="2" name="product_attr"
                  ng-model="p.product_attr"
                  disabled
                  >
                  <i></i>
                  儿童剧
                </label>


                 <label class="i-checks  checkbox-inline">
                  <input type="radio" value="3" name="product_attr"
                  ng-model="p.product_attr"
                  >
                  <i></i>
                  实物
                </label>

            </div>
        </div>

        <div class="form-group" ng-if="p.product_attr == '1'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">产品所属</label>
            <div class="col-sm-9 col-xs-12">
                <label class="i-checks  checkbox-inline" 
                ng-repeat="item in sale_belong_arr">
                  <input type="radio" value="{{item.value}}" name="sys_affirm_type"
                  ng-model="p.sale_belong"
                  >
                  <i></i>
                  {{item.label}}
                </label>
            </div>
        </div>


        <!-- 票付通 -->
        <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品供应商id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_supply">
            </div>
        </div>
        <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品景区id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_view">
            </div>
        </div>
        <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_code">
            </div>
        </div>
        <!-- 票付通 -->


        <!-- 天时同城 -->
        <div class="form-group" 
        ng-if="p.sale_belong == 'weshop_tstc_al' || p.sale_belong == 'weshop_tstc_bg'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_code">
            </div>
        </div>
        <!-- 天时同城 -->


        <!-- 居游 -->
        <div class="form-group" 
        ng-if="p.sale_belong == 'weshop_juyou'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_code">
            </div>
        </div>
        <!-- 居游 -->


        <!-- 海洋馆 -->
        <div class="form-group" 
        ng-if="p.sale_belong == 'weshop_royaloc'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
            <div class="col-sm-4 col-xs-12">
                <input type="text" class="form-control" 
                ng-model="p.sysaffirm_target_goods_code">
            </div>
        </div>

        <!-- <div class="form-group" 
        ng-if="p.sale_belong == 'weshop_royaloc'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">退票类别</label>
            <div class="col-sm-4 col-xs-12">
                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="sysaffirm_target_goods_back_type"
                  ng-model="p.sysaffirm_target_goods_back_type"
                  >
                  <i></i>
                  不限制
                </label>

                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="sysaffirm_target_goods_back_type"
                  ng-model="p.sysaffirm_target_goods_back_type"
                  >
                  <i></i>
                  只能退最大可用数量
                </label>
            </div>
        </div> -->


        <div class="form-group" 
        ng-if="p.sale_belong == 'weshop_royaloc'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">成人/儿童</label>
            <div class="col-sm-4 col-xs-12">
                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="sysaffirm_target_goods_child_flag"
                  ng-model="p.sysaffirm_target_goods_child_flag"
                  >
                  <i></i>
                  成人
                </label>

                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="sysaffirm_target_goods_child_flag"
                  ng-model="p.sysaffirm_target_goods_child_flag"
                  >
                  <i></i>
                  儿童
                </label>
            </div>
        </div>


        <!-- 海洋馆 -->

        <div class="line line-dashed b-b line-lg pull-in"></div>

        <div class="form-group" ng-if="p.product_attr == '1'" >
            <label class="col-sm-3 col-xs-4 control-label text-right">所属商家</label>
            <div class="col-sm-4 col-xs-12">
                <ui-select multiple ng-model="p.place_code_array" theme="bootstrap" >
                  <ui-select-match placeholder="选择一个商家，如果没有创建一个">
                      <!-- {{$select.selected.name}} -->
                      {{$item.name}}
                  </ui-select-match>
                  <ui-select-choices repeat="item.code as item in view_array | filter: $select.search">
                      <span ng-bind-html="item.name | highlight: $select.search"></span>
                      [<span ng-bind-html="item.code | highlight: $select.search"></span> ]
                  </ui-select-choices>
              </ui-select>
            </div>
            <div class="col-sm-3 col-xs-12 ">
              <button type="button" class="btn btn-info"
              ng-click="createPlace()"
              >
                  创建商家
              </button>
            </div>

        </div>

        <div class="form-group" >
            <label class="col-sm-3 col-xs-4 control-label text-right">价格模式</label>
            <div class="col-sm-4 col-xs-12">
                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="price_type"
                  ng-model="p.price_type"
                  >
                  <i></i>
                  有效期模式
                </label>

                <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="price_type"
                  ng-model="p.price_type"
                  >
                  <i></i>
                  价格日历
                </label>

            </div>
        </div>


        <div class="form-group" ng-if="p.price_type == '0'">
          <label class="col-sm-3 control-label">商城价格</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" ng-model="p.price">
            <span class="help-block m-b-none">游客在商城实际支付的价格。</span>
          </div>
        </div>


        <div class="form-group" ng-if="p.price_type == '1'">
          <label class="col-sm-3 control-label"></label>
          <div class="col-sm-9">
            <p class="form-control-static">后续设置</p>
            <!-- <price-calendar 
              data="data"
              showattrarr="showattrarr"
              clickday="clickday"
              refresh="refresh"
            ></price-calendar> -->
          </div>
        </div>


        


        <div class="form-group" ng-if="p.product_attr == '1'">
          <label class="col-sm-3 control-label">有效期</label>
          <div class="col-sm-2">
            <input type="text" class="form-control " ng-model="p.s" 
            datetimepicker readonly
            options="vm1.options"
            >
          </div>
          <div class="col-sm-2">
            <input type="text" class="form-control " ng-model="p.e" 
            datetimepicker readonly
            options="vm1.options"
            >
          </div>
        </div>

        <div class="line line-dashed b-b line-lg pull-in"></div>




        <div class="form-group">
          <div class="col-sm-4 col-sm-offset-3">
            <button type="submit" class="btn btn-primary btn-block"
            ng-click="gogo()"
            >保存</button>
          </div>
        </div>


      </div>
    </div>

</div>
</div>
</div>
</div>






